﻿using MiniFox.Components;
using MiniFox.Platform.Applications.Auth;
using MiniFox.Platform.Applications.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.Applications.Providers
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister]
    public interface IDesktopProvider
    {
        /// <summary>
        /// 按机构提取应用列表（管理员）
        /// </summary>
        /// <returns></returns>
        IEnumerable<SystemApp> GetSystemApps();
        /// <summary>
        /// 按机构提取应用列表
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        IEnumerable<SystemApp> GetSystemApps(SystemUser user);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="appId"></param>
        /// <returns></returns>
        IEnumerable<SystemNavBase> GetMenu(string appId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="appId"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        IEnumerable<SystemNavBase> GetMenu(string appId, SystemUser user);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="appId"></param>
        /// <returns></returns>
        IEnumerable<SystemNavBase> GetNavigation(string appId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="appId"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        IEnumerable<SystemNavBase> GetNavigation(string appId, SystemUser user);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="module"></param>
        /// <returns></returns>
        bool CreateShortcut(SystemUser user, SystemNavModule module);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="module"></param>
        /// <returns></returns>
        bool RemoveShortcut(SystemUser user, SystemNavModule module);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        IEnumerable<Shortcut> GetUserShortcuts(SystemUser user);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="keyword"></param>
        /// <returns></returns>
        IEnumerable<SystemNavModule> SearchModules(SystemUser user, string keyword);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="orgId"></param>
        /// <returns></returns>
        Organization GetOrganization(string orgId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        SystemUser GetSystemUser(string userId);
    }
}
